<template>
	<view class="direction_box">
		<view class="direction_box_item" v-for="item in 10">
			<view class="direction_box_item_img_box">
				<image src="/static/img/banner2.jpeg" mode="">
				</image>
				<view class="direction_box_item_img_logo">
					鲨鱼
				</view>
				<view class="direction_box_item_img_fl">
					<view class="direction_box_item_img_zk">
						优惠：
					</view>
					<view class="direction_box_item_img_zk_num">
						18888
					</view>
				</view>
			</view>
			<view class="direction_box_item_num_box">
				<view class="direction_box_item_num">
					188888
				</view>
				<view class="direction_box_item_oldnum">
					1666666
				</view>
			</view>
			<view class="list_item_header">
				<view class="list_item_text_tag">
					标签
				</view>
				<view class="list_item_text_title ellipsis">
					标题随便写点啥子阿萨大大十大高手就是发货及时发
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>

</script>

<style lang="scss" scoped>
	.ellipsis {
		display: -webkit-box;
		/* 使用 Flexbox */
		-webkit-box-orient: vertical;
		/* 设置为垂直方向 */
		-webkit-line-clamp: 1;
		/* 限制显示的行数为 2 */
		overflow: hidden;
		/* 隐藏超出部分 */
		text-overflow: ellipsis;
		/* 使用省略号表示超出部分 */
		line-height: 1.5;
		/* 行高设置 */
		max-height: 1.5em;
		/* 限制最大高度，2行 */
	}
	.direction_box {
		display: grid;
		grid-gap: 20rpx;
		grid-template-columns: repeat(2, calc(50% - 10rpx));

		.direction_box_item {
			height: 500rpx;
			border-radius: 10px;

			.direction_box_item_img_box {
				height: 400rpx;
				position: relative;
				;

				image {
					border-radius: 10px 10px 0 0;
					height: 400rpx;
					width: 100%;
					object-fit: cover;
				}

				.direction_box_item_img_logo {
					position: absolute;
					top: 0rpx;

					left: 0rpx;
					background: pink;
					padding: 4px 6px;
					border-radius: 10px 0;
					color: #f5f5f5;
				}

				.direction_box_item_img_fl {
					position: absolute;
					bottom: 0rpx;
					left: 0rpx;
					display: flex;
					align-items: center;
					background: pink;
					border-radius: 10px;
					padding: 4px 6px;

					.direction_box_item_img_zk {


						font-size: 12px;
						color: #666;
					}

					.direction_box_item_img_zk_num {
						font-size: 12px;
						color: red;
					}
				}
			}

			.direction_box_item_num_box {
				display: flex;
				align-items: baseline;
				gap: 10rpx;
				margin-top: 10rpx;

				.direction_box_item_num {
					font-size: 20px;
					color: pink;
					font-family: 700;
				}

				.direction_box_item_oldnum {
					font-size: 12px;
					margin-left: 20rpx;
					text-decoration: line-through;
					color: #666;
				}
			}
			.list_item_header {
				display: flex;
			
				.list_item_text_tag {
					border-radius: 8px;
					background: pink;
					font-size: 12px;
					padding: 2px 4px;
					margin-right: 8px;
					flex: none;
					color: #666;
				}
			
				.list_item_text_title {
					flex: 1;
					font-size: 12px;
					font-family: 600;
				}
			}
		}
	}
</style>